package top.goldenyear.porpoise.common.core.util.convert;

import cn.hutool.v7.core.bean.BeanUtil;
import cn.hutool.v7.core.convert.ConvertUtil;

import java.util.Map;

/**
 * 当前主要是避免和 hutool 和 solon 的 ConvertUtil重名
 *
 * @author airhead
 */
public class ConvertUtils extends ConvertUtil {
  public static <S, T> T toBean(S source, Class<T> tClass) {
    return BeanUtil.toBean(source, tClass);
  }

  public static <S> Map<String, Object> toMap(S source) {
    return BeanUtil.toBeanMap(source);
  }
}
